/*
 This file 'modernizr' is part of Firebird Integrated Solution 1.0

 Copyright (c) 2017 Lincong

 Contact:  
 Email: lincong1987@gmail.com

 QQ: 159257119

 See Usage at http://www.jplatformx.com/firebird

 Create date: 2017-02-17 17:29
 */


/*!
 * modernizr v3.3.1
 * Build https://modernizr.com/download?-appearance-atobbtoa-canvas-contextmenu-cookies-datauri-emoji-filereader-filesystem-flash-flexbox-fontface-fullscreen-geolocation-getusermedia-history-ie8compat-imgcrossorigin-json-localstorage-matchmedia-placeholder-postmessage-supports-svg-textareamaxlength-touchevents-urlparser-userdata-video-webgl-webworkers-setclasses-dontmin
 *
 * Copyright (c)
 *  Faruk Ates
 *  Paul Irish
 *  Alex Sexton
 *  Ryan Seddon
 *  Patrick Kettner
 *  Stu Cox
 *  Richard Herrera

 * MIT License
 */

/*
 * Modernizr tests which native CSS3 and HTML5 features are available in the
 * current UA and makes the results available to you in two ways: as properties on
 * a global `Modernizr` object, and as classes on the `<html>` element. This
 * information allows you to progressively enhance your pages with a granular level
 * of control over the experience.
 */

;(function (window, document, undefined) {
	var classes = [];


	var tests = [];


	/**
	 *
	 * ModernizrProto is the constructor for Modernizr
	 *
	 * @class
	 * @access public
	 */

	var ModernizrProto = {
		// The current version, dummy
		_version: '3.3.1',

		// Any settings that don't work as separate modules
		// can go in here as configuration.
		_config: {
			'classPrefix': 'fb-',
			'enableClasses': true,
			'enableJSClass': true,
			'usePrefixes': true
		},

		// Queue of tests
		_q: [],

		// Stub these for people who are listening
		on: function (test, cb) {
			// I don't really think people should do this, but we can
			// safe guard it a bit.
			// -- NOTE:: this gets WAY overridden in src/addTest for actual async tests.
			// This is in case people listen to synchronous tests. I would leave it out,
			// but the code to *disallow* sync tests in the real version of this
			// function is actually larger than this.
			var self = this;
			setTimeout(function () {
				cb(self[test]);
			}, 0);
		},

		addTest: function (name, fn, options) {
			tests.push({name: name, fn: fn, options: options});
		},

		addAsyncTest: function (fn) {
			tests.push({name: null, fn: fn});
		}
	};


	// Fake some of Object.create so we can force non test results to be non "own" properties.
	var Modernizr = function () {
	};
	Modernizr.prototype = ModernizrProto;

	// Leak modernizr globally when you `require` it rather than force it here.
	// Overwrite name so constructor name is nicer :D
	Modernizr = new Modernizr();


	/*!
	 {
	 "name": "Cookies",
	 "property": "cookies",
	 "tags": ["storage"],
	 "authors": ["tauren"]
	 }
	 !*/
	/* DOC
	 Detects whether cookie support is enabled.
	 */

	// https://github.com/Modernizr/Modernizr/issues/191

	Modernizr.addTest('cookies', function () {
		// navigator.cookieEnabled cannot detect custom or nuanced cookie blocking
		// configurations. For example, when blocking cookies via the Advanced
		// Privacy Settings in IE9, it always returns true. And there have been
		// issues in the past with site-specific exceptions.
		// Don't rely on it.

		// try..catch because some in situations `document.cookie` is exposed but throws a
		// SecurityError if you try to access it; e.g. documents created from data URIs
		// or in sandboxed iframes (depending on flags/context)
		try {
			// Create cookie
			document.cookie = 'cookietest=1';
			var ret = document.cookie.indexOf('cookietest=') != -1;
			// Delete cookie
			document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
			return ret;
		}
		catch (e) {
			return false;
		}
	});

	/*!
	 {
	 "name": "Geolocation API",
	 "property": "geolocation",
	 "caniuse": "geolocation",
	 "tags": ["media"],
	 "notes": [{
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/WebAPI/Using_geolocation"
	 }],
	 "polyfills": [
	 "joshuabell-polyfill",
	 "webshims",
	 "geo-location-javascript",
	 "geolocation-api-polyfill"
	 ]
	 }
	 !*/
	/* DOC
	 Detects support for the Geolocation API for users to provide their location to web applications.
	 */

	// geolocation is often considered a trivial feature detect...
	// Turns out, it's quite tricky to get right:
	//
	// Using !!navigator.geolocation does two things we don't want. It:
	//   1. Leaks memory in IE9: github.com/Modernizr/Modernizr/issues/513
	//   2. Disables page caching in WebKit: webk.it/43956
	//
	// Meanwhile, in Firefox < 8, an about:config setting could expose
	// a false positive that would throw an exception: bugzil.la/688158

	Modernizr.addTest('geolocation', 'geolocation' in navigator);

	/*!
	 {
	 "name": "History API",
	 "property": "history",
	 "caniuse": "history",
	 "tags": ["history"],
	 "authors": ["Hay Kranen", "Alexander Farkas"],
	 "notes": [{
	 "name": "W3C Spec",
	 "href": "https://www.w3.org/TR/html51/browsers.html#the-history-interface"
	 }, {
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/API/window.history"
	 }],
	 "polyfills": ["historyjs", "html5historyapi"]
	 }
	 !*/
	/* DOC
	 Detects support for the History API for manipulating the browser session history.
	 */

	Modernizr.addTest('history', function () {
		// Issue #733
		// The stock browser on Android 2.2 & 2.3, and 4.0.x returns positive on history support
		// Unfortunately support is really buggy and there is no clean way to detect
		// these bugs, so we fall back to a user agent sniff :(
		var ua = navigator.userAgent;

		// We only want Android 2 and 4.0, stock browser, and not Chrome which identifies
		// itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471).
		if ((ua.indexOf('Android 2.') !== -1 ||
			(ua.indexOf('Android 4.0') !== -1)) &&
			ua.indexOf('Mobile Safari') !== -1 &&
			ua.indexOf('Chrome') === -1 &&
			ua.indexOf('Windows Phone') === -1) {
			return false;
		}

		// Return the regular check
		return (window.history && 'pushState' in window.history);
	});

	/*!
	 {
	 "name": "IE8 compat mode",
	 "property": "ie8compat",
	 "authors": ["Erich Ocean"]
	 }
	 !*/
	/* DOC
	 Detects whether or not the current browser is IE8 in compatibility mode (i.e. acting as IE7).
	 */

	// In this case, IE8 will be acting as IE7. You may choose to remove features in this case.

	// related:
	// james.padolsey.com/javascript/detect-ie-in-js-using-conditional-comments/

	Modernizr.addTest('ie8compat', (!window.addEventListener && !!document.documentMode && document.documentMode === 7));

	/*!
	 {
	 "name": "JSON",
	 "property": "json",
	 "caniuse": "json",
	 "notes": [{
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Glossary/JSON"
	 }],
	 "polyfills": ["json2"]
	 }
	 !*/
	/* DOC
	 Detects native support for JSON handling functions.
	 */

	// this will also succeed if you've loaded the JSON2.js polyfill ahead of time
	//   ... but that should be obvious. :)

	Modernizr.addTest('json', 'JSON' in window && 'parse' in JSON && 'stringify' in JSON);

	/*!
	 {
	 "name": "postMessage",
	 "property": "postmessage",
	 "caniuse": "x-doc-messaging",
	 "notes": [{
	 "name": "W3C Spec",
	 "href": "http://www.w3.org/TR/html5/comms.html#posting-messages"
	 }],
	 "polyfills": ["easyxdm", "postmessage-jquery"]
	 }
	 !*/
	/* DOC
	 Detects support for the `window.postMessage` protocol for cross-document messaging.
	 */

	Modernizr.addTest('postmessage', 'postMessage' in window);

	/*!
	 {
	 "name": "SVG",
	 "property": "svg",
	 "caniuse": "svg",
	 "tags": ["svg"],
	 "authors": ["Erik Dahlstrom"],
	 "polyfills": [
	 "svgweb",
	 "raphael",
	 "amplesdk",
	 "canvg",
	 "svg-boilerplate",
	 "sie",
	 "dojogfx",
	 "fabricjs"
	 ]
	 }
	 !*/
	/* DOC
	 Detects support for SVG in `<embed>` or `<object>` elements.
	 */

	Modernizr.addTest('svg', !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect);

	/*!
	 {
	 "name": "CSS Supports",
	 "property": "supports",
	 "caniuse": "css-featurequeries",
	 "tags": ["css"],
	 "builderAliases": ["css_supports"],
	 "notes": [{
	 "name": "W3 Spec",
	 "href": "http://dev.w3.org/csswg/css3-conditional/#at-supports"
	 },{
	 "name": "Related Github Issue",
	 "href": "github.com/Modernizr/Modernizr/issues/648"
	 },{
	 "name": "W3 Info",
	 "href": "http://dev.w3.org/csswg/css3-conditional/#the-csssupportsrule-interface"
	 }]
	 }
	 !*/

	var newSyntax = 'CSS' in window && 'supports' in window.CSS;
	var oldSyntax = 'supportsCSS' in window;
	Modernizr.addTest('supports', newSyntax || oldSyntax);

	/*!
	 {
	 "name": "File API",
	 "property": "filereader",
	 "caniuse": "fileapi",
	 "notes": [{
	 "name": "W3C Working Draft",
	 "href": "https://www.w3.org/TR/FileAPI/"
	 }],
	 "tags": ["file"],
	 "builderAliases": ["file_api"],
	 "knownBugs": ["Will fail in Safari 5 due to its lack of support for the standards defined FileReader object"]
	 }
	 !*/
	/* DOC
	 `filereader` tests for the File API specification

	 Tests for objects specific to the File API W3C specification without
	 being redundant (don't bother testing for Blob since it is assumed
	 to be the File object's prototype.)
	 */

	Modernizr.addTest('filereader', !!(window.File && window.FileList && window.FileReader));

	/*!
	 {
	 "name": "Local Storage",
	 "property": "localstorage",
	 "caniuse": "namevalue-storage",
	 "tags": ["storage"],
	 "knownBugs": [],
	 "notes": [],
	 "warnings": [],
	 "polyfills": [
	 "joshuabell-polyfill",
	 "cupcake",
	 "storagepolyfill",
	 "amplifyjs",
	 "yui-cacheoffline"
	 ]
	 }
	 !*/

	// In FF4, if disabled, window.localStorage should === null.

	// Normally, we could not test that directly and need to do a
	//   `('localStorage' in window) && ` test first because otherwise Firefox will
	//   throw bugzil.la/365772 if cookies are disabled

	// Also in iOS5 Private Browsing mode, attempting to use localStorage.setItem
	// will throw the exception:
	//   QUOTA_EXCEEDED_ERROR DOM Exception 22.
	// Peculiarly, getItem and removeItem calls do not throw.

	// Because we are forced to try/catch this, we'll go aggressive.

	// Just FWIW: IE8 Compat mode supports these features completely:
	//   www.quirksmode.org/dom/html5.html
	// But IE8 doesn't support either with local files

	Modernizr.addTest('localstorage', function () {
		var mod = 'modernizr';
		try {
			localStorage.setItem(mod, mod);
			localStorage.removeItem(mod);
			return true;
		} catch (e) {
			return false;
		}
	});

	/*!
	 {
	 "name": "URL parser",
	 "property": "urlparser",
	 "notes": [{
	 "name": "URL",
	 "href": "https://dvcs.w3.org/hg/url/raw-file/tip/Overview.html"
	 }],
	 "polyfills": ["urlparser"],
	 "authors": ["Ron Waldon (@jokeyrhyme)"],
	 "tags": ["url"]
	 }
	 !*/
	/* DOC
	 Check if browser implements the URL constructor for parsing URLs.
	 */

	Modernizr.addTest('urlparser', function () {
		var url;
		try {
			// have to actually try use it, because Safari defines a dud constructor
			url = new URL('http://modernizr.com/');
			return url.href === 'http://modernizr.com/';
		} catch (e) {
			return false;
		}
	});

	/*!
	 {
	 "name": "Base 64 encoding/decoding",
	 "property": ["atobbtoa"],
	 "builderAliases": ["atob-btoa"],
	 "caniuse" : "atob-btoa",
	 "tags": ["atob", "base64", "WindowBase64", "btoa"],
	 "authors": ["Christian Ulbrich"],
	 "notes": [{
	 "name": "WindowBase64",
	 "href": "https://www.w3.org/TR/html5/webappapis.html#windowbase64"
	 }, {
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/atob"
	 }],
	 "polyfills": ["base64js"]
	 }
	 !*/
	/* DOC

	 Detects support for WindowBase64 API (window.atob && window.btoa).

	 */

	Modernizr.addTest('atobbtoa', 'atob' in window && 'btoa' in window, {aliases: ['atob-btoa']});

	/*!
	 {
	 "name": "Web Workers",
	 "property": "webworkers",
	 "caniuse" : "webworkers",
	 "tags": ["performance", "workers"],
	 "notes": [{
	 "name": "W3C Reference",
	 "href": "https://www.w3.org/TR/workers/"
	 }, {
	 "name": "HTML5 Rocks article",
	 "href": "http://www.html5rocks.com/en/tutorials/workers/basics/"
	 }, {
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/Guide/Performance/Using_web_workers"
	 }],
	 "polyfills": ["fakeworker", "html5shims"]
	 }
	 !*/
	/* DOC
	 Detects support for the basic `Worker` API from the Web Workers spec. Web Workers provide a simple means for web content to run scripts in background threads.
	 */

	Modernizr.addTest('webworkers', 'Worker' in window);


	/**
	 * is returns a boolean if the typeof an obj is exactly type.
	 *
	 * @access private
	 * @function is
	 * @param {*} obj - A thing we want to check the type of
	 * @param {string} type - A string to compare the typeof against
	 * @returns {boolean}
	 */

	function is(obj, type) {
		return typeof obj === type;
	}
	;

	/**
	 * Run through all tests and detect their support in the current UA.
	 *
	 * @access private
	 */

	function testRunner() {
		var featureNames;
		var feature;
		var aliasIdx;
		var result;
		var nameIdx;
		var featureName;
		var featureNameSplit;

		for (var featureIdx in tests) {
			if (tests.hasOwnProperty(featureIdx)) {
				featureNames = [];
				feature = tests[featureIdx];
				// run the test, throw the return value into the Modernizr,
				// then based on that boolean, define an appropriate className
				// and push it into an array of classes we'll join later.
				//
				// If there is no name, it's an 'async' test that is run,
				// but not directly added to the object. That should
				// be done with a post-run addTest call.
				if (feature.name) {
					featureNames.push(feature.name.toLowerCase());

					if (feature.options && feature.options.aliases && feature.options.aliases.length) {
						// Add all the aliases into the names list
						for (aliasIdx = 0; aliasIdx < feature.options.aliases.length; aliasIdx++) {
							featureNames.push(feature.options.aliases[aliasIdx].toLowerCase());
						}
					}
				}

				// Run the test, or use the raw value if it's not a function
				result = is(feature.fn, 'function') ? feature.fn() : feature.fn;


				// Set each of the names on the Modernizr object
				for (nameIdx = 0; nameIdx < featureNames.length; nameIdx++) {
					featureName = featureNames[nameIdx];
					// Support dot properties as sub tests. We don't do checking to make sure
					// that the implied parent tests have been added. You must call them in
					// order (either in the test, or make the parent test a dependency).
					//
					// Cap it to TWO to make the logic simple and because who needs that kind of subtesting
					// hashtag famous last words
					featureNameSplit = featureName.split('.');

					if (featureNameSplit.length === 1) {
						Modernizr[featureNameSplit[0]] = result;
					} else {
						// cast to a Boolean, if not one already
						/* jshint -W053 */
						if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
							Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
						}

						Modernizr[featureNameSplit[0]][featureNameSplit[1]] = result;
					}

					classes.push((result ? '' : 'no-') + featureNameSplit.join('-'));
				}
			}
		}
	}
	;

	/**
	 * docElement is a convenience wrapper to grab the root element of the document
	 *
	 * @access private
	 * @returns {HTMLElement|SVGElement} The root element of the document
	 */

	var docElement = document.documentElement;

	/*!
	 {
	 "name": "Context menus",
	 "property": "contextmenu",
	 "caniuse": "menu",
	 "notes": [{
	 "name": "W3C spec",
	 "href": "http://www.w3.org/TR/html5/interactive-elements.html#context-menus"
	 },{
	 "name": "thewebrocks.com Demo",
	 "href": "http://thewebrocks.com/demos/context-menu/"
	 }],
	 "polyfills": ["jquery-contextmenu"]
	 }
	 !*/
	/* DOC
	 Detects support for custom context menus.
	 */

	Modernizr.addTest(
		'contextmenu',
		('contextMenu' in docElement && 'HTMLMenuItemElement' in window)
	);


	/**
	 * A convenience helper to check if the document we are running in is an SVG document
	 *
	 * @access private
	 * @returns {boolean}
	 */

	var isSVG = docElement.nodeName.toLowerCase() === 'svg';


	/**
	 * setClasses takes an array of class names and adds them to the root element
	 *
	 * @access private
	 * @function setClasses
	 * @param {string[]} classes - Array of class names
	 */

	// Pass in an and array of class names, e.g.:
	//  ['no-webp', 'borderradius', ...]
	function setClasses(classes) {
		var className = docElement.className;
		var classPrefix = Modernizr._config.classPrefix || '';

		if (isSVG) {
			className = className.baseVal;
		}

		// Change `no-js` to `js` (independently of the `enableClasses` option)
		// Handle classPrefix on this too
		if (Modernizr._config.enableJSClass) {
			var reJS = new RegExp('(^|\\s)' + classPrefix + 'no-js(\\s|$)');
			className = className.replace(reJS, '$1' + classPrefix + 'js$2');
		}

		if (Modernizr._config.enableClasses) {
			// Add the new classes
			className += ' ' + classPrefix + classes.join(' ' + classPrefix);
			isSVG ? docElement.className.baseVal = className : docElement.className = className;
		}

	}

	;

	/**
	 * createElement is a convenience wrapper around document.createElement. Since we
	 * use createElement all over the place, this allows for (slightly) smaller code
	 * as well as abstracting away issues with creating elements in contexts other than
	 * HTML documents (e.g. SVG documents).
	 *
	 * @access private
	 * @function createElement
	 * @returns {HTMLElement|SVGElement} An HTML or SVG element
	 */

	function createElement() {
		if (typeof document.createElement !== 'function') {
			// This is the case in IE7, where the type of createElement is "object".
			// For this reason, we cannot call apply() as Object is not a Function.
			return document.createElement(arguments[0]);
		} else if (isSVG) {
			return document.createElementNS.call(document, 'http://www.w3.org/2000/svg', arguments[0]);
		} else {
			return document.createElement.apply(document, arguments);
		}
	}

	;
	/*!
	 {
	 "name": "Canvas",
	 "property": "canvas",
	 "caniuse": "canvas",
	 "tags": ["canvas", "graphics"],
	 "polyfills": ["flashcanvas", "excanvas", "slcanvas", "fxcanvas"]
	 }
	 !*/
	/* DOC
	 Detects support for the `<canvas>` element for 2D drawing.
	 */

	// On the S60 and BB Storm, getContext exists, but always returns undefined
	// so we actually have to call getContext() to verify
	// github.com/Modernizr/Modernizr/issues/issue/97/
	Modernizr.addTest('canvas', function () {
		var elem = createElement('canvas');
		return !!(elem.getContext && elem.getContext('2d'));
	});

	/*!
	 {
	 "name": "IE User Data API",
	 "property": "userdata",
	 "tags": ["storage"],
	 "authors": ["@stereobooster"],
	 "notes": [{
	 "name": "MSDN Documentation",
	 "href": "https://msdn.microsoft.com/en-us/library/ms531424.aspx"
	 }]
	 }
	 !*/
	/* DOC
	 Detects support for IE userData for persisting data, an API similar to localStorage but supported since IE5.
	 */

	Modernizr.addTest('userdata', !!createElement('div').addBehavior);

	/*!
	 {
	 "name": "HTML5 Video",
	 "property": "video",
	 "caniuse": "video",
	 "tags": ["html5"],
	 "knownBugs": [
	 "Without QuickTime, `Modernizr.video.h264` will be `undefined`; https://github.com/Modernizr/Modernizr/issues/546"
	 ],
	 "polyfills": [
	 "html5media",
	 "mediaelementjs",
	 "sublimevideo",
	 "videojs",
	 "leanbackplayer",
	 "videoforeverybody"
	 ]
	 }
	 !*/
	/* DOC
	 Detects support for the video element, as well as testing what types of content it supports.

	 Subproperties are provided to describe support for `ogg`, `h264` and `webm` formats, e.g.:

	 ```javascript
	 Modernizr.video         // true
	 Modernizr.video.ogg     // 'probably'
	 ```
	 */

	// Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845
	//                     thx to NielsLeenheer and zcorpan

	// Note: in some older browsers, "no" was a return value instead of empty string.
	//   It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2
	//   It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5

	Modernizr.addTest('video', function () {
		/* jshint -W053 */
		var elem = createElement('video');
		var bool = false;

		// IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224
		try {
			if (bool = !!elem.canPlayType) {
				bool = new Boolean(bool);
				bool.ogg = elem.canPlayType('video/ogg; codecs="theora"').replace(/^no$/, '');

				// Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546
				bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/, '');

				bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/, '');

				bool.vp9 = elem.canPlayType('video/webm; codecs="vp9"').replace(/^no$/, '');

				bool.hls = elem.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/, '');
			}
		} catch (e) {
		}

		return bool;
	});

	/*!
	 {
	 "name": "WebGL",
	 "property": "webgl",
	 "caniuse": "webgl",
	 "tags": ["webgl", "graphics"],
	 "polyfills": ["jebgl", "cwebgl", "iewebgl"]
	 }
	 !*/

	Modernizr.addTest('webgl', function () {
		var canvas = createElement('canvas');
		var supports = 'probablySupportsContext' in canvas ? 'probablySupportsContext' : 'supportsContext';
		if (supports in canvas) {
			return canvas[supports]('webgl') || canvas[supports]('experimental-webgl');
		}
		return 'WebGLRenderingContext' in window;
	});

	/*!
	 {
	 "name": "placeholder attribute",
	 "property": "placeholder",
	 "tags": ["forms", "attribute"],
	 "builderAliases": ["forms_placeholder"]
	 }
	 !*/
	/* DOC
	 Tests for placeholder attribute in inputs and textareas
	 */

	Modernizr.addTest('placeholder', ('placeholder' in createElement('input') && 'placeholder' in createElement('textarea')));

	/*!
	 {
	 "name": "Image crossOrigin",
	 "property": "imgcrossorigin",
	 "notes": [{
	 "name": "Cross Domain Images and the Tainted Canvas",
	 "href": "https://blog.codepen.io/2013/10/08/cross-domain-images-tainted-canvas/"
	 }]
	 }
	 !*/
	/* DOC
	 Detects support for the crossOrigin attribute on images, which allow for cross domain images inside of a canvas without tainting it
	 */

	Modernizr.addTest('imgcrossorigin', 'crossOrigin' in createElement('img'));

	/*!
	 {
	 "name": "textarea maxlength",
	 "property": "textareamaxlength",
	 "aliases": ["textarea-maxlength"],
	 "notes": [{
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea"
	 }],
	 "polyfills": [
	 "maxlength"
	 ]
	 }
	 !*/
	/* DOC
	 Detect support for the maxlength attribute of a textarea element
	 */

	Modernizr.addTest('textareamaxlength', !!('maxLength' in createElement('textarea')));

	/*!
	 {
	 "name": "Canvas text",
	 "property": "canvastext",
	 "caniuse": "canvas-text",
	 "tags": ["canvas", "graphics"],
	 "polyfills": ["canvastext"]
	 }
	 !*/
	/* DOC
	 Detects support for the text APIs for `<canvas>` elements.
	 */

	Modernizr.addTest('canvastext', function () {
		if (Modernizr.canvas === false) {
			return false;
		}
		return typeof createElement('canvas').getContext('2d').fillText == 'function';
	});

	/*!
	 {
	 "name": "Emoji",
	 "property": "emoji"
	 }
	 !*/
	/* DOC
	 Detects support for emoji character sets.
	 */

	Modernizr.addTest('emoji', function () {
		if (!Modernizr.canvastext) {
			return false;
		}
		var pixelRatio = window.devicePixelRatio || 1;
		var offset = 12 * pixelRatio;
		var node = createElement('canvas');
		var ctx = node.getContext('2d');
		ctx.fillStyle = '#f00';
		ctx.textBaseline = 'top';
		ctx.font = '32px Arial';
		ctx.fillText('\ud83d\udc28', 0, 0); // U+1F428 KOALA
		return ctx.getImageData(offset, offset, 1, 1).data[0] !== 0;
	});


	/**
	 * getBody returns the body of a document, or an element that can stand in for
	 * the body if a real body does not exist
	 *
	 * @access private
	 * @function getBody
	 * @returns {HTMLElement|SVGElement} Returns the real body of a document, or an
	 * artificially created element that stands in for the body
	 */

	function getBody() {
		// After page load injecting a fake body doesn't work so check if body exists
		var body = document.body;

		if (!body) {
			// Can't use the real body create a fake one.
			body = createElement(isSVG ? 'svg' : 'body');
			body.fake = true;
		}

		return body;
	}

	;

	/**
	 * List of property values to set for css tests. See ticket #21
	 * http://git.io/vUGl4
	 *
	 * @memberof Modernizr
	 * @name Modernizr._prefixes
	 * @optionName Modernizr._prefixes
	 * @optionProp prefixes
	 * @access public
	 * @example
	 *
	 * Modernizr._prefixes is the internal list of prefixes that we test against
	 * inside of things like [prefixed](#modernizr-prefixed) and [prefixedCSS](#-code-modernizr-prefixedcss). It is simply
	 * an array of kebab-case vendor prefixes you can use within your code.
	 *
	 * Some common use cases include
	 *
	 * Generating all possible prefixed version of a CSS property
	 * ```js
	 * var rule = Modernizr._prefixes.join('transform: rotate(20deg); ');
	 *
	 * rule === 'transform: rotate(20deg); webkit-transform: rotate(20deg); moz-transform: rotate(20deg); o-transform: rotate(20deg); ms-transform: rotate(20deg);'
	 * ```
	 *
	 * Generating all possible prefixed version of a CSS value
	 * ```js
	 * rule = 'display:' +  Modernizr._prefixes.join('flex; display:') + 'flex';
	 *
	 * rule === 'display:flex; display:-webkit-flex; display:-moz-flex; display:-o-flex; display:-ms-flex; display:flex'
	 * ```
	 */

		// we use ['',''] rather than an empty array in order to allow a pattern of .`join()`ing prefixes to test
		// values in feature detects to continue to work
	var prefixes = (ModernizrProto._config.usePrefixes ? ' -webkit- -moz- -o- -ms- '.split(' ') : ['', '']);

	// expose these for the plugin API. Look in the source for how to join() them against your input
	ModernizrProto._prefixes = prefixes;


	/**
	 * hasOwnProp is a shim for hasOwnProperty that is needed for Safari 2.0 support
	 *
	 * @author kangax
	 * @access private
	 * @function hasOwnProp
	 * @param {object} object - The object to check for a property
	 * @param {string} property - The property to check for
	 * @returns {boolean}
	 */

		// hasOwnProperty shim by kangax needed for Safari 2.0 support
	var hasOwnProp;

	(function () {
		var _hasOwnProperty = ({}).hasOwnProperty;
		/* istanbul ignore else */
		/* we have no way of testing IE 5.5 or safari 2,
		 * so just assume the else gets hit */
		if (!is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined')) {
			hasOwnProp = function (object, property) {
				return _hasOwnProperty.call(object, property);
			};
		}
		else {
			hasOwnProp = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */
				return ((property in object) && is(object.constructor.prototype[property], 'undefined'));
			};
		}
	})();


	// _l tracks listeners for async tests, as well as tests that execute after the initial run
	ModernizrProto._l = {};

	/**
	 * Modernizr.on is a way to listen for the completion of async tests. Being
	 * asynchronous, they may not finish before your scripts run. As a result you
	 * will get a possibly false negative `undefined` value.
	 *
	 * @memberof Modernizr
	 * @name Modernizr.on
	 * @access public
	 * @function on
	 * @param {string} feature - String name of the feature detect
	 * @param {function} cb - Callback function returning a Boolean - true if feature is supported, false if not
	 * @example
	 *
	 * ```js
	 * Modernizr.on('flash', function( result ) {
   *   if (result) {
   *    // the browser has flash
   *   } else {
   *     // the browser does not have flash
   *   }
   * });
	 * ```
	 */

	ModernizrProto.on = function (feature, cb) {
		// Create the list of listeners if it doesn't exist
		if (!this._l[feature]) {
			this._l[feature] = [];
		}

		// Push this test on to the listener list
		this._l[feature].push(cb);

		// If it's already been resolved, trigger it on next tick
		if (Modernizr.hasOwnProperty(feature)) {
			// Next Tick
			setTimeout(function () {
				Modernizr._trigger(feature, Modernizr[feature]);
			}, 0);
		}
	};

	/**
	 * _trigger is the private function used to signal test completion and run any
	 * callbacks registered through [Modernizr.on](#modernizr-on)
	 *
	 * @memberof Modernizr
	 * @name Modernizr._trigger
	 * @access private
	 * @function _trigger
	 * @param {string} feature - string name of the feature detect
	 * @param {function|boolean} [res] - A feature detection function, or the boolean =
	 * result of a feature detection function
	 */

	ModernizrProto._trigger = function (feature, res) {
		if (!this._l[feature]) {
			return;
		}

		var cbs = this._l[feature];

		// Force async
		setTimeout(function () {
			var i, cb;
			for (i = 0; i < cbs.length; i++) {
				cb = cbs[i];
				cb(res);
			}
		}, 0);

		// Don't trigger these again
		delete this._l[feature];
	};

	/**
	 * addTest allows you to define your own feature detects that are not currently
	 * included in Modernizr (under the covers it's the exact same code Modernizr
	 * uses for its own [feature detections](https://github.com/Modernizr/Modernizr/tree/master/feature-detects)). Just like the offical detects, the result
	 * will be added onto the Modernizr object, as well as an appropriate className set on
	 * the html element when configured to do so
	 *
	 * @memberof Modernizr
	 * @name Modernizr.addTest
	 * @optionName Modernizr.addTest()
	 * @optionProp addTest
	 * @access public
	 * @function addTest
	 * @param {string|object} feature - The string name of the feature detect, or an
	 * object of feature detect names and test
	 * @param {function|boolean} test - Function returning true if feature is supported,
	 * false if not. Otherwise a boolean representing the results of a feature detection
	 * @example
	 *
	 * The most common way of creating your own feature detects is by calling
	 * `Modernizr.addTest` with a string (preferably just lowercase, without any
	 * punctuation), and a function you want executed that will return a boolean result
	 *
	 * ```js
	 * Modernizr.addTest('itsTuesday', function() {
   *  var d = new Date();
   *  return d.getDay() === 2;
   * });
	 * ```
	 *
	 * When the above is run, it will set Modernizr.itstuesday to `true` when it is tuesday,
	 * and to `false` every other day of the week. One thing to notice is that the names of
	 * feature detect functions are always lowercased when added to the Modernizr object. That
	 * means that `Modernizr.itsTuesday` will not exist, but `Modernizr.itstuesday` will.
	 *
	 *
	 *  Since we only look at the returned value from any feature detection function,
	 *  you do not need to actually use a function. For simple detections, just passing
	 *  in a statement that will return a boolean value works just fine.
	 *
	 * ```js
	 * Modernizr.addTest('hasJquery', 'jQuery' in window);
	 * ```
	 *
	 * Just like before, when the above runs `Modernizr.hasjquery` will be true if
	 * jQuery has been included on the page. Not using a function saves a small amount
	 * of overhead for the browser, as well as making your code much more readable.
	 *
	 * Finally, you also have the ability to pass in an object of feature names and
	 * their tests. This is handy if you want to add multiple detections in one go.
	 * The keys should always be a string, and the value can be either a boolean or
	 * function that returns a boolean.
	 *
	 * ```js
	 * var detects = {
   *  'hasjquery': 'jQuery' in window,
   *  'itstuesday': function() {
   *    var d = new Date();
   *    return d.getDay() === 2;
   *  }
   * }
	 *
	 * Modernizr.addTest(detects);
	 * ```
	 *
	 * There is really no difference between the first methods and this one, it is
	 * just a convenience to let you write more readable code.
	 */

	function addTest(feature, test) {

		if (typeof feature == 'object') {
			for (var key in feature) {
				if (hasOwnProp(feature, key)) {
					addTest(key, feature[key]);
				}
			}
		} else {

			feature = feature.toLowerCase();
			var featureNameSplit = feature.split('.');
			var last = Modernizr[featureNameSplit[0]];

			// Again, we don't check for parent test existence. Get that right, though.
			if (featureNameSplit.length == 2) {
				last = last[featureNameSplit[1]];
			}

			if (typeof last != 'undefined') {
				// we're going to quit if you're trying to overwrite an existing test
				// if we were to allow it, we'd do this:
				//   var re = new RegExp("\\b(no-)?" + feature + "\\b");
				//   docElement.className = docElement.className.replace( re, '' );
				// but, no rly, stuff 'em.
				return Modernizr;
			}

			test = typeof test == 'function' ? test() : test;

			// Set the value (this is the magic, right here).
			if (featureNameSplit.length == 1) {
				Modernizr[featureNameSplit[0]] = test;
			} else {
				// cast to a Boolean, if not one already
				/* jshint -W053 */
				if (Modernizr[featureNameSplit[0]] && !(Modernizr[featureNameSplit[0]] instanceof Boolean)) {
					Modernizr[featureNameSplit[0]] = new Boolean(Modernizr[featureNameSplit[0]]);
				}

				Modernizr[featureNameSplit[0]][featureNameSplit[1]] = test;
			}

			// Set a single class (either `feature` or `no-feature`)
			/* jshint -W041 */
			setClasses([(!!test && test != false ? '' : 'no-') + featureNameSplit.join('-')]);
			/* jshint +W041 */

			// Trigger the event
			Modernizr._trigger(feature, test);
		}

		return Modernizr; // allow chaining.
	}

	// After all the tests are run, add self to the Modernizr prototype
	Modernizr._q.push(function () {
		ModernizrProto.addTest = addTest;
	});


	/*!
	 {
	 "name": "Flash",
	 "property": "flash",
	 "tags": ["flash"],
	 "polyfills": ["shumway"]
	 }
	 !*/
	/* DOC
	 Detects Flash support as well as Flash-blocking plugins
	 */

	Modernizr.addAsyncTest(function () {
		/* jshint -W053 */

		var attachBody = function (body) {
			if (!docElement.contains(body)) {
				docElement.appendChild(body);
			}
		};
		var removeFakeBody = function (body) {
			// If we’re rockin’ an attached fake body, clean it up
			if (body.fake && body.parentNode) {
				body.parentNode.removeChild(body);
			}
		};
		var runTest = function (result, embed) {
			var bool = !!result;
			if (bool) {
				bool = new Boolean(bool);
				bool.blocked = (result === 'blocked');
			}
			addTest('flash', function () {
				return bool;
			});

			if (embed && body.contains(embed)) {

				// in case embed has been wrapped, as with ClickToPlugin
				while (embed.parentNode !== body) {
					embed = embed.parentNode;
				}

				body.removeChild(embed);
			}

		};
		var easy_detect;
		var activex;
		// we wrap activex in a try/catch because when Flash is disabled through
		// ActiveX controls, it throws an error.
		try {
			// Pan is an API that exists for Flash objects.
			activex = 'ActiveXObject' in window && 'Pan' in new window.ActiveXObject('ShockwaveFlash.ShockwaveFlash');
		} catch (e) {
		}

		easy_detect = !(('plugins' in navigator && 'Shockwave Flash' in navigator.plugins) || activex);

		if (easy_detect || isSVG) {
			runTest(false);
		}
		else {
			// Flash seems to be installed, but it might be blocked. We have to
			// actually create an element to see what happens to it.
			var embed = createElement('embed');
			var body = getBody();
			var blockedDetect;
			var inline_style;

			embed.type = 'application/x-shockwave-flash';

			// Need to do this in the body (fake or otherwise) otherwise IE8 complains
			body.appendChild(embed);

			// Pan doesn't exist in the embed if its IE (its on the ActiveXObjeect)
			// so this check is for all other browsers.
			if (!('Pan' in embed) && !activex) {
				attachBody(body);
				runTest('blocked', embed);
				removeFakeBody(body);
				return;
			}

			blockedDetect = function () {
				// if we used a fake body originally, we need to restart this test, since
				// we haven't been attached to the DOM, and therefore none of the blockers
				// have had time to work.
				attachBody(body);
				if (!docElement.contains(body)) {
					body = document.body || body;
					embed = createElement('embed');
					embed.type = 'application/x-shockwave-flash';
					body.appendChild(embed);
					return setTimeout(blockedDetect, 1000);
				}
				if (!docElement.contains(embed)) {
					runTest('blocked');
				}
				else {
					inline_style = embed.style.cssText;
					if (inline_style !== '') {
						// the style of the element has changed automatically. This is a
						// really poor heuristic, but for lower end Flash blocks, it the
						// only change they can make.
						runTest('blocked', embed);
					}
					else {
						runTest(true, embed);
					}
				}
				removeFakeBody(body);
			};

			// If we have got this far, there is still a chance a userland plugin
			// is blocking us (either changing the styles, or automatically removing
			// the element). Both of these require us to take a step back for a moment
			// to allow for them to get time of the thread, hence a setTimeout.
			//
			setTimeout(blockedDetect, 10);
		}
	});

	/*!
	 {
	 "name": "Data URI",
	 "property": "datauri",
	 "caniuse": "datauri",
	 "tags": ["url"],
	 "builderAliases": ["url_data_uri"],
	 "async": true,
	 "notes": [{
	 "name": "Wikipedia article",
	 "href": "https://en.wikipedia.org/wiki/Data_URI_scheme"
	 }],
	 "warnings": ["Support in Internet Explorer 8 is limited to images and linked resources like CSS files, not HTML files"]
	 }
	 !*/
	/* DOC
	 Detects support for data URIs. Provides a subproperty to report support for data URIs over 32kb in size:

	 ```javascript
	 Modernizr.datauri           // true
	 Modernizr.datauri.over32kb  // false in IE8
	 ```
	 */

	// https://github.com/Modernizr/Modernizr/issues/14
	Modernizr.addAsyncTest(function () {
		/* jshint -W053 */

		// IE7 throw a mixed content warning on HTTPS for this test, so we'll
		// just blacklist it (we know it doesn't support data URIs anyway)
		// https://github.com/Modernizr/Modernizr/issues/362
		if (navigator.userAgent.indexOf('MSIE 7.') !== -1) {
			// Keep the test async
			setTimeout(function () {
				addTest('datauri', false);
			}, 10);
		}

		var datauri = new Image();

		datauri.onerror = function () {
			addTest('datauri', false);
		};
		datauri.onload = function () {
			if (datauri.width == 1 && datauri.height == 1) {
				testOver32kb();
			}
			else {
				addTest('datauri', false);
			}
		};

		datauri.src = '';

		// Once we have datauri, let's check to see if we can use data URIs over
		// 32kb (IE8 can't). https://github.com/Modernizr/Modernizr/issues/321
		function testOver32kb() {

			var datauriBig = new Image();

			datauriBig.onerror = function () {
				addTest('datauri', true);
				Modernizr.datauri = new Boolean(true);
				Modernizr.datauri.over32kb = false;
			};
			datauriBig.onload = function () {
				addTest('datauri', true);
				Modernizr.datauri = new Boolean(true);
				Modernizr.datauri.over32kb = (datauriBig.width == 1 && datauriBig.height == 1);
			};

			var base64str = 'R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==';
			while (base64str.length < 33000) {
				base64str = '\r\n' + base64str;
			}
			datauriBig.src = 'data:image/gif;base64,' + base64str;
		}

	});


	/**
	 * cssToDOM takes a kebab-case string and converts it to camelCase
	 * e.g. box-sizing -> boxSizing
	 *
	 * @access private
	 * @function cssToDOM
	 * @param {string} name - String name of kebab-case prop we want to convert
	 * @returns {string} The camelCase version of the supplied name
	 */

	function cssToDOM(name) {
		return name.replace(/([a-z])-([a-z])/g, function (str, m1, m2) {
			return m1 + m2.toUpperCase();
		}).replace(/^-/, '');
	}
	;

	/**
	 * injectElementWithStyles injects an element with style element and some CSS rules
	 *
	 * @access private
	 * @function injectElementWithStyles
	 * @param {string} rule - String representing a css rule
	 * @param {function} callback - A function that is used to test the injected element
	 * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
	 * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
	 * @returns {boolean}
	 */

	function injectElementWithStyles(rule, callback, nodes, testnames) {
		var mod = 'modernizr';
		var style;
		var ret;
		var node;
		var docOverflow;
		var div = createElement('div');
		var body = getBody();

		if (parseInt(nodes, 10)) {
			// In order not to give false positives we create a node for each test
			// This also allows the method to scale for unspecified uses
			while (nodes--) {
				node = createElement('div');
				node.id = testnames ? testnames[nodes] : mod + (nodes + 1);
				div.appendChild(node);
			}
		}

		style = createElement('style');
		style.type = 'text/css';
		style.id = 's' + mod;

		// IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody.
		// Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270
		(!body.fake ? div : body).appendChild(style);
		body.appendChild(div);

		if (style.styleSheet) {
			style.styleSheet.cssText = rule;
		} else {
			style.appendChild(document.createTextNode(rule));
		}
		div.id = mod;

		if (body.fake) {
			//avoid crashing IE8, if background image is used
			body.style.background = '';
			//Safari 5.13/5.1.4 OSX stops loading if ::-webkit-scrollbar is used and scrollbars are visible
			body.style.overflow = 'hidden';
			docOverflow = docElement.style.overflow;
			docElement.style.overflow = 'hidden';
			docElement.appendChild(body);
		}

		ret = callback(div, rule);
		// If this is done after page load we don't want to remove the body so check if body exists
		if (body.fake) {
			body.parentNode.removeChild(body);
			docElement.style.overflow = docOverflow;
			// Trigger layout so kinetic scrolling isn't disabled in iOS6+
			docElement.offsetHeight;
		} else {
			div.parentNode.removeChild(div);
		}

		return !!ret;

	}

	;

	/**
	 * testStyles injects an element with style element and some CSS rules
	 *
	 * @memberof Modernizr
	 * @name Modernizr.testStyles
	 * @optionName Modernizr.testStyles()
	 * @optionProp testStyles
	 * @access public
	 * @function testStyles
	 * @param {string} rule - String representing a css rule
	 * @param {function} callback - A function that is used to test the injected element
	 * @param {number} [nodes] - An integer representing the number of additional nodes you want injected
	 * @param {string[]} [testnames] - An array of strings that are used as ids for the additional nodes
	 * @returns {boolean}
	 * @example
	 *
	 * `Modernizr.testStyles` takes a CSS rule and injects it onto the current page
	 * along with (possibly multiple) DOM elements. This lets you check for features
	 * that can not be detected by simply checking the [IDL](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Interface_development_guide/IDL_interface_rules).
	 *
	 * ```js
	 * Modernizr.testStyles('#modernizr { width: 9px; color: papayawhip; }', function(elem, rule) {
   *   // elem is the first DOM node in the page (by default #modernizr)
   *   // rule is the first argument you supplied - the CSS rule in string form
   *
   *   addTest('widthworks', elem.style.width === '9px')
   * });
	 * ```
	 *
	 * If your test requires multiple nodes, you can include a third argument
	 * indicating how many additional div elements to include on the page. The
	 * additional nodes are injected as children of the `elem` that is returned as
	 * the first argument to the callback.
	 *
	 * ```js
	 * Modernizr.testStyles('#modernizr {width: 1px}; #modernizr2 {width: 2px}', function(elem) {
   *   document.getElementById('modernizr').style.width === '1px'; // true
   *   document.getElementById('modernizr2').style.width === '2px'; // true
   *   elem.firstChild === document.getElementById('modernizr2'); // true
   * }, 1);
	 * ```
	 *
	 * By default, all of the additional elements have an ID of `modernizr[n]`, where
	 * `n` is its index (e.g. the first additional, second overall is `#modernizr2`,
	 * the second additional is `#modernizr3`, etc.).
	 * If you want to have more meaningful IDs for your function, you can provide
	 * them as the fourth argument, as an array of strings
	 *
	 * ```js
	 * Modernizr.testStyles('#foo {width: 10px}; #bar {height: 20px}', function(elem) {
   *   elem.firstChild === document.getElementById('foo'); // true
   *   elem.lastChild === document.getElementById('bar'); // true
   * }, 2, ['foo', 'bar']);
	 * ```
	 *
	 */

	var testStyles = ModernizrProto.testStyles = injectElementWithStyles;

	/*!
	 {
	 "name": "Touch Events",
	 "property": "touchevents",
	 "caniuse" : "touch",
	 "tags": ["media", "attribute"],
	 "notes": [{
	 "name": "Touch Events spec",
	 "href": "https://www.w3.org/TR/2013/WD-touch-events-20130124/"
	 }],
	 "warnings": [
	 "Indicates if the browser supports the Touch Events spec, and does not necessarily reflect a touchscreen device"
	 ],
	 "knownBugs": [
	 "False-positive on some configurations of Nokia N900",
	 "False-positive on some BlackBerry 6.0 builds – https://github.com/Modernizr/Modernizr/issues/372#issuecomment-3112695"
	 ]
	 }
	 !*/
	/* DOC
	 Indicates if the browser supports the W3C Touch Events API.

	 This *does not* necessarily reflect a touchscreen device:

	 * Older touchscreen devices only emulate mouse events
	 * Modern IE touch devices implement the Pointer Events API instead: use `Modernizr.pointerevents` to detect support for that
	 * Some browsers & OS setups may enable touch APIs when no touchscreen is connected
	 * Future browsers may implement other event models for touch interactions

	 See this article: [You Can't Detect A Touchscreen](http://www.stucox.com/blog/you-cant-detect-a-touchscreen/).

	 It's recommended to bind both mouse and touch/pointer events simultaneously – see [this HTML5 Rocks tutorial](http://www.html5rocks.com/en/mobile/touchandmouse/).

	 This test will also return `true` for Firefox 4 Multitouch support.
	 */

	// Chrome (desktop) used to lie about its support on this, but that has since been rectified: http://crbug.com/36415
	Modernizr.addTest('touchevents', function () {
		var bool;
		if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
			bool = true;
		} else {
			// include the 'heartz' as a way to have a non matching MQ to help terminate the join
			// https://git.io/vznFH
			var query = ['@media (', prefixes.join('touch-enabled),('), 'heartz', ')', '{#modernizr{top:9px;position:absolute}}'].join('');
			testStyles(query, function (node) {
				bool = node.offsetTop === 9;
			});
		}
		return bool;
	});

	/*!
	 {
	 "name": "@font-face",
	 "property": "fontface",
	 "authors": ["Diego Perini", "Mat Marquis"],
	 "tags": ["css"],
	 "knownBugs": [
	 "False Positive: WebOS https://github.com/Modernizr/Modernizr/issues/342",
	 "False Postive: WP7 https://github.com/Modernizr/Modernizr/issues/538"
	 ],
	 "notes": [{
	 "name": "@font-face detection routine by Diego Perini",
	 "href": "http://javascript.nwbox.com/CSSSupport/"
	 },{
	 "name": "Filament Group @font-face compatibility research",
	 "href": "https://docs.google.com/presentation/d/1n4NyG4uPRjAA8zn_pSQ_Ket0RhcWC6QlZ6LMjKeECo0/edit#slide=id.p"
	 },{
	 "name": "Filament Grunticon/@font-face device testing results",
	 "href": "https://docs.google.com/spreadsheet/ccc?key=0Ag5_yGvxpINRdHFYeUJPNnZMWUZKR2ItMEpRTXZPdUE#gid=0"
	 },{
	 "name": "CSS fonts on Android",
	 "href": "https://stackoverflow.com/questions/3200069/css-fonts-on-android"
	 },{
	 "name": "@font-face and Android",
	 "href": "http://archivist.incutio.com/viewlist/css-discuss/115960"
	 }]
	 }
	 !*/

	var blacklist = (function () {
		var ua = navigator.userAgent;
		var wkvers = ua.match(/applewebkit\/([0-9]+)/gi) && parseFloat(RegExp.$1);
		var webos = ua.match(/w(eb)?osbrowser/gi);
		var wppre8 = ua.match(/windows phone/gi) && ua.match(/iemobile\/([0-9])+/gi) && parseFloat(RegExp.$1) >= 9;
		var oldandroid = wkvers < 533 && ua.match(/android/gi);
		return webos || oldandroid || wppre8;
	}());
	if (blacklist) {
		Modernizr.addTest('fontface', false);
	} else {
		testStyles('@font-face {font-family:"font";src:url("https://")}', function (node, rule) {
			var style = document.getElementById('smodernizr');
			var sheet = style.sheet || style.styleSheet;
			var cssText = sheet ? (sheet.cssRules && sheet.cssRules[0] ? sheet.cssRules[0].cssText : sheet.cssText || '') : '';
			var bool = /src/i.test(cssText) && cssText.indexOf(rule.split(' ')[0]) === 0;
			Modernizr.addTest('fontface', bool);
		});
	}
	;

	/**
	 * If the browsers follow the spec, then they would expose vendor-specific style as:
	 *   elem.style.WebkitBorderRadius
	 * instead of something like the following, which would be technically incorrect:
	 *   elem.style.webkitBorderRadius

	 * Webkit ghosts their properties in lowercase but Opera & Moz do not.
	 * Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+
	 *   erik.eae.net/archives/2008/03/10/21.48.10/

	 * More here: github.com/Modernizr/Modernizr/issues/issue/21
	 *
	 * @access private
	 * @returns {string} The string representing the vendor-specific style properties
	 */

	var omPrefixes = 'Moz O ms Webkit';


	var cssomPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.split(' ') : []);
	ModernizrProto._cssomPrefixes = cssomPrefixes;


	/**
	 * atRule returns a given CSS property at-rule (eg @keyframes), possibly in
	 * some prefixed form, or false, in the case of an unsupported rule
	 *
	 * @memberof Modernizr
	 * @name Modernizr.atRule
	 * @optionName Modernizr.atRule()
	 * @optionProp atRule
	 * @access public
	 * @function atRule
	 * @param {string} prop - String name of the @-rule to test for
	 * @returns {string|boolean} The string representing the (possibly prefixed)
	 * valid version of the @-rule, or `false` when it is unsupported.
	 * @example
	 * ```js
	 *  var keyframes = Modernizr.atRule('@keyframes');
	 *
	 *  if (keyframes) {
   *    // keyframes are supported
   *    // could be `@-webkit-keyframes` or `@keyframes`
   *  } else {
   *    // keyframes === `false`
   *  }
	 * ```
	 *
	 */

	var atRule = function (prop) {
		var length = prefixes.length;
		var cssrule = window.CSSRule;
		var rule;

		if (typeof cssrule === 'undefined') {
			return undefined;
		}

		if (!prop) {
			return false;
		}

		// remove literal @ from beginning of provided property
		prop = prop.replace(/^@/, '');

		// CSSRules use underscores instead of dashes
		rule = prop.replace(/-/g, '_').toUpperCase() + '_RULE';

		if (rule in cssrule) {
			return '@' + prop;
		}

		for (var i = 0; i < length; i++) {
			// prefixes gives us something like -o-, and we want O_
			var prefix = prefixes[i];
			var thisRule = prefix.toUpperCase() + '_' + rule;

			if (thisRule in cssrule) {
				return '@-' + prefix.toLowerCase() + '-' + prop;
			}
		}

		return false;
	};

	ModernizrProto.atRule = atRule;


	/**
	 * List of JavaScript DOM values used for tests
	 *
	 * @memberof Modernizr
	 * @name Modernizr._domPrefixes
	 * @optionName Modernizr._domPrefixes
	 * @optionProp domPrefixes
	 * @access public
	 * @example
	 *
	 * Modernizr._domPrefixes is exactly the same as [_prefixes](#modernizr-_prefixes), but rather
	 * than kebab-case properties, all properties are their Capitalized variant
	 *
	 * ```js
	 * Modernizr._domPrefixes === [ "Moz", "O", "ms", "Webkit" ];
	 * ```
	 */

	var domPrefixes = (ModernizrProto._config.usePrefixes ? omPrefixes.toLowerCase().split(' ') : []);
	ModernizrProto._domPrefixes = domPrefixes;


	/**
	 * contains checks to see if a string contains another string
	 *
	 * @access private
	 * @function contains
	 * @param {string} str - The string we want to check for substrings
	 * @param {string} substr - The substring we want to search the first string for
	 * @returns {boolean}
	 */

	function contains(str, substr) {
		return !!~('' + str).indexOf(substr);
	}

	;

	/**
	 * fnBind is a super small [bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind) polyfill.
	 *
	 * @access private
	 * @function fnBind
	 * @param {function} fn - a function you want to change `this` reference to
	 * @param {object} that - the `this` you want to call the function with
	 * @returns {function} The wrapped version of the supplied function
	 */

	function fnBind(fn, that) {
		return function () {
			return fn.apply(that, arguments);
		};
	}

	;

	/**
	 * testDOMProps is a generic DOM property test; if a browser supports
	 *   a certain property, it won't return undefined for it.
	 *
	 * @access private
	 * @function testDOMProps
	 * @param {array.<string>} props - An array of properties to test for
	 * @param {object} obj - An object or Element you want to use to test the parameters again
	 * @param {boolean|object} elem - An Element to bind the property lookup again. Use `false` to prevent the check
	 */
	function testDOMProps(props, obj, elem) {
		var item;

		for (var i in props) {
			if (props[i] in obj) {

				// return the property name as a string
				if (elem === false) {
					return props[i];
				}

				item = obj[props[i]];

				// let's bind a function
				if (is(item, 'function')) {
					// bind to obj unless overriden
					return fnBind(item, elem || obj);
				}

				// return the unbound function or obj or value
				return item;
			}
		}
		return false;
	}

	;

	/**
	 * Create our "modernizr" element that we do most feature tests on.
	 *
	 * @access private
	 */

	var modElem = {
		elem: createElement('modernizr')
	};

	// Clean up this element
	Modernizr._q.push(function () {
		delete modElem.elem;
	});


	var mStyle = {
		style: modElem.elem.style
	};

	// kill ref for gc, must happen before mod.elem is removed, so we unshift on to
	// the front of the queue.
	Modernizr._q.unshift(function () {
		delete mStyle.style;
	});


	/**
	 * domToCSS takes a camelCase string and converts it to kebab-case
	 * e.g. boxSizing -> box-sizing
	 *
	 * @access private
	 * @function domToCSS
	 * @param {string} name - String name of camelCase prop we want to convert
	 * @returns {string} The kebab-case version of the supplied name
	 */

	function domToCSS(name) {
		return name.replace(/([A-Z])/g, function (str, m1) {
			return '-' + m1.toLowerCase();
		}).replace(/^ms-/, '-ms-');
	}
	;

	/**
	 * nativeTestProps allows for us to use native feature detection functionality if available.
	 * some prefixed form, or false, in the case of an unsupported rule
	 *
	 * @access private
	 * @function nativeTestProps
	 * @param {array} props - An array of property names
	 * @param {string} value - A string representing the value we want to check via @supports
	 * @returns {boolean|undefined} A boolean when @supports exists, undefined otherwise
	 */

	// Accepts a list of property names and a single value
	// Returns `undefined` if native detection not available
	function nativeTestProps(props, value) {
		var i = props.length;
		// Start with the JS API: http://www.w3.org/TR/css3-conditional/#the-css-interface
		if ('CSS' in window && 'supports' in window.CSS) {
			// Try every prefixed variant of the property
			while (i--) {
				if (window.CSS.supports(domToCSS(props[i]), value)) {
					return true;
				}
			}
			return false;
		}
		// Otherwise fall back to at-rule (for Opera 12.x)
		else if ('CSSSupportsRule' in window) {
			// Build a condition string for every prefixed variant
			var conditionText = [];
			while (i--) {
				conditionText.push('(' + domToCSS(props[i]) + ':' + value + ')');
			}
			conditionText = conditionText.join(' or ');
			return injectElementWithStyles('@supports (' + conditionText + ') { #modernizr { position: absolute; } }', function (node) {
				return getComputedStyle(node, null).position == 'absolute';
			});
		}
		return undefined;
	}
	;

	// testProps is a generic CSS / DOM property test.

	// In testing support for a given CSS property, it's legit to test:
	//    `elem.style[styleName] !== undefined`
	// If the property is supported it will return an empty string,
	// if unsupported it will return undefined.

	// We'll take advantage of this quick test and skip setting a style
	// on our modernizr element, but instead just testing undefined vs
	// empty string.

	// Property names can be provided in either camelCase or kebab-case.

	function testProps(props, prefixed, value, skipValueTest) {
		skipValueTest = is(skipValueTest, 'undefined') ? false : skipValueTest;

		// Try native detect first
		if (!is(value, 'undefined')) {
			var result = nativeTestProps(props, value);
			if (!is(result, 'undefined')) {
				return result;
			}
		}

		// Otherwise do it properly
		var afterInit, i, propsLength, prop, before;

		// If we don't have a style element, that means we're running async or after
		// the core tests, so we'll need to create our own elements to use

		// inside of an SVG element, in certain browsers, the `style` element is only
		// defined for valid tags. Therefore, if `modernizr` does not have one, we
		// fall back to a less used element and hope for the best.
		// for strict XHTML browsers the hardly used samp element is used
		var elems = ['modernizr', 'tspan', 'samp'];
		while (!mStyle.style && elems.length) {
			afterInit = true;
			mStyle.modElem = createElement(elems.shift());
			mStyle.style = mStyle.modElem.style;
		}

		// Delete the objects if we created them.
		function cleanElems() {
			if (afterInit) {
				delete mStyle.style;
				delete mStyle.modElem;
			}
		}

		propsLength = props.length;
		for (i = 0; i < propsLength; i++) {
			prop = props[i];
			before = mStyle.style[prop];

			if (contains(prop, '-')) {
				prop = cssToDOM(prop);
			}

			if (mStyle.style[prop] !== undefined) {

				// If value to test has been passed in, do a set-and-check test.
				// 0 (integer) is a valid property value, so check that `value` isn't
				// undefined, rather than just checking it's truthy.
				if (!skipValueTest && !is(value, 'undefined')) {

					// Needs a try catch block because of old IE. This is slow, but will
					// be avoided in most cases because `skipValueTest` will be used.
					try {
						mStyle.style[prop] = value;
					} catch (e) {
					}

					// If the property value has changed, we assume the value used is
					// supported. If `value` is empty string, it'll fail here (because
					// it hasn't changed), which matches how browsers have implemented
					// CSS.supports()
					if (mStyle.style[prop] != before) {
						cleanElems();
						return prefixed == 'pfx' ? prop : true;
					}
				}
				// Otherwise just return true, or the property name if this is a
				// `prefixed()` call
				else {
					cleanElems();
					return prefixed == 'pfx' ? prop : true;
				}
			}
		}
		cleanElems();
		return false;
	}

	;

	/**
	 * testPropsAll tests a list of DOM properties we want to check against.
	 * We specify literally ALL possible (known and/or likely) properties on
	 * the element including the non-vendor prefixed one, for forward-
	 * compatibility.
	 *
	 * @access private
	 * @function testPropsAll
	 * @param {string} prop - A string of the property to test for
	 * @param {string|object} [prefixed] - An object to check the prefixed properties on. Use a string to skip
	 * @param {HTMLElement|SVGElement} [elem] - An element used to test the property and value against
	 * @param {string} [value] - A string of a css value
	 * @param {boolean} [skipValueTest] - An boolean representing if you want to test if value sticks when set
	 */
	function testPropsAll(prop, prefixed, elem, value, skipValueTest) {

		var ucProp = prop.charAt(0).toUpperCase() + prop.slice(1),
			props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' ');

		// did they call .prefixed('boxSizing') or are we just testing a prop?
		if (is(prefixed, 'string') || is(prefixed, 'undefined')) {
			return testProps(props, prefixed, value, skipValueTest);

			// otherwise, they called .prefixed('requestAnimationFrame', window[, elem])
		} else {
			props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' ');
			return testDOMProps(props, prefixed, elem);
		}
	}

	// Modernizr.testAllProps() investigates whether a given style property,
	// or any of its vendor-prefixed variants, is recognized
	//
	// Note that the property names must be provided in the camelCase variant.
	// Modernizr.testAllProps('boxSizing')
	ModernizrProto.testAllProps = testPropsAll;


	/**
	 * prefixed returns the prefixed or nonprefixed property name variant of your input
	 *
	 * @memberof Modernizr
	 * @name Modernizr.prefixed
	 * @optionName Modernizr.prefixed()
	 * @optionProp prefixed
	 * @access public
	 * @function prefixed
	 * @param {string} prop - String name of the property to test for
	 * @param {object} [obj] - An object to test for the prefixed properties on
	 * @param {HTMLElement} [elem] - An element used to test specific properties against
	 * @returns {string|false} The string representing the (possibly prefixed) valid
	 * version of the property, or `false` when it is unsupported.
	 * @example
	 *
	 * Modernizr.prefixed takes a string css value in the DOM style camelCase (as
	 * opposed to the css style kebab-case) form and returns the (possibly prefixed)
	 * version of that property that the browser actually supports.
	 *
	 * For example, in older Firefox...
	 * ```js
	 * prefixed('boxSizing')
	 * ```
	 * returns 'MozBoxSizing'
	 *
	 * In newer Firefox, as well as any other browser that support the unprefixed
	 * version would simply return `boxSizing`. Any browser that does not support
	 * the property at all, it will return `false`.
	 *
	 * By default, prefixed is checked against a DOM element. If you want to check
	 * for a property on another object, just pass it as a second argument
	 *
	 * ```js
	 * var rAF = prefixed('requestAnimationFrame', window);
	 *
	 * raf(function() {
   *  renderFunction();
   * })
	 * ```
	 *
	 * Note that this will return _the actual function_ - not the name of the function.
	 * If you need the actual name of the property, pass in `false` as a third argument
	 *
	 * ```js
	 * var rAFProp = prefixed('requestAnimationFrame', window, false);
	 *
	 * rafProp === 'WebkitRequestAnimationFrame' // in older webkit
	 * ```
	 *
	 * One common use case for prefixed is if you're trying to determine which transition
	 * end event to bind to, you might do something like...
	 * ```js
	 * var transEndEventNames = {
   *     'WebkitTransition' : 'webkitTransitionEnd', * Saf 6, Android Browser
   *     'MozTransition'    : 'transitionend',       * only for FF < 15
   *     'transition'       : 'transitionend'        * IE10, Opera, Chrome, FF 15+, Saf 7+
   * };
	 *
	 * var transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ];
	 * ```
	 *
	 * If you want a similar lookup, but in kebab-case, you can use [prefixedCSS](#modernizr-prefixedcss).
	 */

	var prefixed = ModernizrProto.prefixed = function (prop, obj, elem) {
		if (prop.indexOf('@') === 0) {
			return atRule(prop);
		}

		if (prop.indexOf('-') != -1) {
			// Convert kebab-case to camelCase
			prop = cssToDOM(prop);
		}
		if (!obj) {
			return testPropsAll(prop, 'pfx');
		} else {
			// Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame'
			return testPropsAll(prop, obj, elem);
		}
	};


	/*!
	 {
	 "name": "Fullscreen API",
	 "property": "fullscreen",
	 "caniuse": "fullscreen",
	 "notes": [{
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en/API/Fullscreen"
	 }],
	 "polyfills": ["screenfulljs"],
	 "builderAliases": ["fullscreen_api"]
	 }
	 !*/
	/* DOC
	 Detects support for the ability to make the current website take over the user's entire screen
	 */

	// github.com/Modernizr/Modernizr/issues/739
	Modernizr.addTest('fullscreen', !!(prefixed('exitFullscreen', document, false) || prefixed('cancelFullScreen', document, false)));

	/*!
	 {
	 "name": "Filesystem API",
	 "property": "filesystem",
	 "caniuse": "filesystem",
	 "notes": [{
	 "name": "W3 Draft",
	 "href": "http://dev.w3.org/2009/dap/file-system/file-dir-sys.html"
	 }],
	 "authors": ["Eric Bidelman (@ebidel)"],
	 "tags": ["file"],
	 "builderAliases": ["file_filesystem"],
	 "knownBugs": ["The API will be present in Chrome incognito, but will throw an exception. See crbug.com/93417"]
	 }
	 !*/

	Modernizr.addTest('filesystem', !!prefixed('requestFileSystem', window));

	/*!
	 {
	 "name": "getUserMedia",
	 "property": "getusermedia",
	 "caniuse": "stream",
	 "tags": ["webrtc"],
	 "authors": ["Eric Bidelman"],
	 "notes": [{
	 "name": "W3C Media Capture and Streams spec",
	 "href": "https://www.w3.org/TR/mediacapture-streams/"
	 }],
	 "polyfills": ["getusermedia"]
	 }
	 !*/

	Modernizr.addTest('getusermedia', !!prefixed('getUserMedia', navigator));

	/*!
	 {
	 "name": "matchMedia",
	 "property": "matchmedia",
	 "caniuse" : "matchmedia",
	 "tags": ["matchmedia"],
	 "authors": ["Alberto Elias"],
	 "notes": [{
	 "name": "W3C CSSOM View Module",
	 "href": "https://drafts.csswg.org/cssom-view/#the-mediaquerylist-interface"
	 }, {
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/API/Window.matchMedia"
	 }],
	 "polyfills": ["matchmediajs"]
	 }
	 !*/
	/* DOC

	 Detects support for matchMedia.

	 */

	Modernizr.addTest('matchmedia', !!prefixed('matchMedia', window));


	/**
	 * testAllProps determines whether a given CSS property is supported in the browser
	 *
	 * @memberof Modernizr
	 * @name Modernizr.testAllProps
	 * @optionName Modernizr.testAllProps()
	 * @optionProp testAllProps
	 * @access public
	 * @function testAllProps
	 * @param {string} prop - String naming the property to test (either camelCase or kebab-case)
	 * @param {string} [value] - String of the value to test
	 * @param {boolean} [skipValueTest=false] - Whether to skip testing that the value is supported when using non-native detection
	 * @example
	 *
	 * testAllProps determines whether a given CSS property, in some prefixed form,
	 * is supported by the browser.
	 *
	 * ```js
	 * testAllProps('boxSizing')  // true
	 * ```
	 *
	 * It can optionally be given a CSS value in string form to test if a property
	 * value is valid
	 *
	 * ```js
	 * testAllProps('display', 'block') // true
	 * testAllProps('display', 'penguin') // false
	 * ```
	 *
	 * A boolean can be passed as a third parameter to skip the value check when
	 * native detection (@supports) isn't available.
	 *
	 * ```js
	 * testAllProps('shapeOutside', 'content-box', true);
	 * ```
	 */

	function testAllProps(prop, value, skipValueTest) {
		return testPropsAll(prop, undefined, undefined, value, skipValueTest);
	}

	ModernizrProto.testAllProps = testAllProps;

	/*!
	 {
	 "name": "Appearance",
	 "property": "appearance",
	 "caniuse": "css-appearance",
	 "tags": ["css"],
	 "notes": [{
	 "name": "MDN documentation",
	 "href": "https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance"
	 },{
	 "name": "CSS-Tricks CSS Almanac: appearance",
	 "href": "https://css-tricks.com/almanac/properties/a/appearance/"
	 }]
	 }
	 !*/
	/* DOC
	 Detects support for the `appearance` css property, which is used to make an
	 element inherit the style of a standard user interface element. It can also be
	 used to remove the default styles of an element, such as input and buttons.
	 */

	Modernizr.addTest('appearance', testAllProps('appearance'));

	/*!
	 {
	 "name": "Flexbox",
	 "property": "flexbox",
	 "caniuse": "flexbox",
	 "tags": ["css"],
	 "notes": [{
	 "name": "The _new_ flexbox",
	 "href": "http://dev.w3.org/csswg/css3-flexbox"
	 }],
	 "warnings": [
	 "A `true` result for this detect does not imply that the `flex-wrap` property is supported; see the `flexwrap` detect."
	 ]
	 }
	 !*/
	/* DOC
	 Detects support for the Flexible Box Layout model, a.k.a. Flexbox, which allows easy manipulation of layout order and sizing within a container.
	 */

	Modernizr.addTest('flexbox', testAllProps('flexBasis', '1px', true));


	// Run each test
	testRunner();

	// Remove the "no-js" class if it exists
	setClasses(classes);

	delete ModernizrProto.addTest;
	delete ModernizrProto.addAsyncTest;

	// Run the things that are supposed to run after the tests
	for (var i = 0; i < Modernizr._q.length; i++) {
		Modernizr._q[i]();
	}

	// Leak Modernizr namespace
	window.Modernizr = Modernizr;

})(window, document);


/**
 * FbChecker
 */
(function () {

	window.Modernizr = window.FbChecker = Modernizr;

})(window, document);


define(function (require, exports, module) {

	/*
	 {
	 "minify": false,
	 "options": [
	 "setClasses"
	 ],
	 "feature-detects": [
	 "test/canvas",
	 "test/contextmenu",
	 "test/cookies",
	 "test/emoji",
	 "test/flash",
	 "test/fullscreen-api",
	 "test/geolocation",
	 "test/history",
	 "test/ie8compat",
	 "test/json",
	 "test/postmessage",
	 "test/svg",
	 "test/touchevents",
	 "test/userdata",
	 "test/video",
	 "test/webgl",
	 "test/css/appearance",
	 "test/css/flexbox",
	 "test/css/fontface",
	 "test/css/supports",
	 "test/file/api",
	 "test/file/filesystem",
	 "test/forms/placeholder",
	 "test/img/crossorigin",
	 "test/storage/localstorage",
	 "test/textarea/maxlength",
	 "test/url/data-uri",
	 "test/url/parser",
	 "test/webrtc/getusermedia",
	 "test/window/atob-btoa",
	 "test/window/matchmedia",
	 "test/workers/webworkers"
	 ]
	 }
	 */
	module.exports = FbChecker;
});